<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:mo="https://gitee.com/aun/Timo"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">

<body class="timo-layout-page">
    <div class="layui-card">

        <div class="layui-card-header">
            <span class="layui-icon font-s10 color-desc margin-right-5"></span>角色管理
            <div class="pull-right">
                <button data-table-id="NoticeTable" class="layui-btn layui-btn-primary  layui-btn-sm" data-modal="/system/role/form" data-height="450px" data-width="600px">
                    <i class=" layui-icon layui-icon-addition"></i>创建角色</button>
            </div>
        </div>

        <div class="layui-card-line"></div>

        <div class="layui-card-body">

            <div class="layui-card-table layui-tab">
                <div class="layui-tab-content">

                    <table id="RoleTable" data-url="/system/role/index"></table>
                    <script type="text/javascript" th:inline="none">
                        $(function () {
                            $('#RoleTable').layTable({
                                even: true, height: 'full',
                                cols: [[
                                    {field: 'title', title: '角色名称', minWidth: 180, align: 'center'},
                                    {field: 'type', title: '角色类型', minWidth: 180, align: 'center'},
                                    {field: 'remark', title: '描述', align: 'center'},
                                    {field: 'createDate', title: '创建时间', align: 'center'},
                                    {toolbar: '#toolbar', title: '操作', align: 'center', minWidth: 50, fixed: 'right'}
                                ]]
                            });
                        });
                    </script>
                    <script type="text/html" id="toolbar">
                        <a class="layui-btn layui-btn-primary layui-btn-sm" data-width="600px" data-height="450px" data-title="编辑权限" data-modal='/system/role/form?id={{d.id}}'>编 辑</a>
                        <a class="layui-btn layui-btn-normal layui-btn-sm" data-open='/system/role/auth?id={{d.id}}'>授 权</a>
                    </script>
                </div>
            </div>
        </div>


    </div>

</body>
</html>